<!doctype html>
<html class="no-js fixed-layout" xmlns:th="http://www.thymeleaf.org" xmlns:http="http://www.w3.org/1999/xhtml">
<head th:include="include/admin/header::html"></head>
<body>

    <!--引入共有头部-->
    <div th:replace="include/top::header"></div>

    <!--页面主体内容-->
    <div class="am-cf admin-main" style="padding-top: 0">

        <!--引入共有左侧-->
        <div th:replace="include/admin/left::html"></div>

        <!--右侧-->
        <div class="admin-content" id="app">
            <div class="superAdminInfo">
                <div class="superFunction" id="articleManagement">
                    <div class="subject">
                        <div class="articles">
                            <div class="am-g">
                                <div class="am-u-sm-12 " style="padding-left: 0;">
                                    <ol class="am-breadcrumb  am-breadcrumb-slash">
                                        <li class="am-active am-icon-home"> 后台管理</li>
                                        <li class="am-active">用户管理</li>
                                    </ol>
                                    <div class="articleManagementTable">
                                        <table class="table am-table am-table-bd am-table-striped admin-content-table  am-animation-slide-right">
                                            <thead>
                                            <tr>
                                                <th>用户昵称</th><th>注册时间</th><th>状态</th><th>角色</th><th>操作</th>
                                            </tr>
                                            </thead>
                                            <tbody class="tables">
                                                <tr id="" v-for="user in beans">
                                                    <td><a href="#" style="color: #3bb4f2;">{{user.username}}</a></td>
                                                    <td>{{user.registerTime | formatDateTimeFilter}}</td>
                                                    <td v-if="user.status == 1">正常</td>
                                                    <td v-else-if="user.status == 2">屏蔽</td>
                                                    <td v-else-if="user.status == 3">注销</td>
                                                    <td>
                                                        <select v-model.trim="user.role">
                                                            <option value="1" @click="authorize(user.username,1)">普通用户</option>
                                                            <option value="2" @click="authorize(user.username,2)">管理员</option>
                                                            <option value="3" @click="authorize(user.username,3)">超级管理员</option>
                                                        </select>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <a href="#nowhere" @click="update(user.username,1)"><button class="articleDeleteBtn articleDelete am-btn am-btn-warning">正常</button></a>
                                                            <a href="#nowhere" @click="update(user.username,2)"><button class="articleDeleteBtn articleDelete am-btn am-btn-danger">屏蔽</button></a>
                                                            <a href="#nowhere" @click="update(user.username,3)"><button class="articleDeleteBtn articleDelete am-btn am-btn-danger">注销</button></a>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                        <div th:replace="include/page::html" ></div>
                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!--引入共有脚部-->
            <div th:replace="include/admin/footer::html"></div>
        </div>
    </div>

    <!--手机适配显示左侧按钮-->
    <a href="#" class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu" data-am-offcanvas="{target: '#admin-offcanvas'}"></a>

<script src="js/all.js"></script>
<script src="js/plugs_paging.js"></script>
<script src="js/admin/admin_user.js"></script>
</body>
</html>
